<%@ include file="header.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="gen_validatorv4.js" type="text/javascript"></script>
<title>Create Movie</title>
</head>
<body>
<div><b> Create Movie </b></div><br>

<form id="form1" method="post" action="CreateMovie">
	<div class="form-row"><span class="label">Title: </span><input type="text" name="title"/></div>
	<div class="form-row"><span class="label">Banner:</span><input type="text" name="banner"/></div>
	<div class="form-row"><span class="label">Release Date: </span></div>
		<div><span class="label">Month: </span><input type="text" name="month"/></div>
		<div><span class="label">Day: </span><input type="text" name="day"/></div>
		<div><span class="label">Year: </span><input type="text" name="year"/></div>
	<div class="form-row"><span class="label">Rental Fee: </span><input type="text" name="fee"/></div>
	<div class="form-row"><span class="label">Category: </span><input type="text" name="category"/></div>
	<div class="form-row"><span class="label">Quantity: </span><input type="text" name="quantity"/></div>
	<div class="form-row"><input class ="submit" type="submit" value="Submit"/></div>
</form>

<script  type="text/javascript">
	 var frmvalidator = new Validator("form1");

	 frmvalidator.addValidation("title","req", "Please enter in a title.");
	 frmvalidator.addValidation("category","req", "Please enter in a category.");
	 frmvalidator.addValidation("banner","req", "Please enter in a banner (production company).");
	 frmvalidator.addValidation("month","req", "Please enter in a month.");
	 frmvalidator.addValidation("month","numeric", "Please enter in a number for a month");
	 frmvalidator.addValidation("day","req", "Please enter in a day.");
	 frmvalidator.addValidation("day","numeric", "Please enter in a number for a day");
	 frmvalidator.addValidation("year","req", "Please enter in a year.");
	 frmvalidator.addValidation("year","numeric", "Please enter in a number for a year");
	 frmvalidator.addValidation("fee","req", "Please enter a rental fee.");
	 frmvalidator.addValidation("fee","numeric", "Fee must be numeric.");
	 frmvalidator.addValidation("quantity","numeric", "Quantity must be numeric.");
	 frmvalidator.addValidation("quantity","gt=0", "Quantity must greater than 0");
	 frmvalidator.addValidation("quantity","req", "You must enter a quantity");
</script>

</body>
</html>